﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.OleDb;
using System.Data.SqlClient;

namespace DAO
{
    public class DataProvider
    {
        /// <summary>
        /// Tạo kết nối đến CSDL QLCHH tren sql cua moi may
        /// </summary>
        /// <returns></returns>
        public static SqlConnection ConnectDB()
        {
            string connectionString = @"Data Source=.\SQLEXPRESS;Initial Catalog=QLCHH;Integrated Security=True";
            //string connectionString = @"Data Source=.\;Initial Catalog=QLCHH;Integrated Security=True";
            SqlConnection conn;
            conn = new SqlConnection(connectionString);
            conn.Open();
            return conn;
        }
    }
}
S